//
//  SXZHNewsMainImageCell.m
//  ShiXun
//
//  Created by lanou on 15/10/28.
//  Copyright © 2015年 张琪. All rights reserved.
//

#import "SXZHNewsMainImageCell.h"
#import "UIImageView+WebCache.h"
#import "SXZHNewsMainCell.h"
@implementation SXZHNewsMainImageCell
- (void)setConfigureModel:(SXZHNewsMainModel *)configureModel
{
    _configureModel = configureModel;
    _titleLabel.text = configureModel.title;
    _titleLabel.frame = CGRectMake(15, 15, kScreenWidth - 100, [SXZHNewsMainCell heightOfString:_titleLabel.text]);
    [_coverImg sd_setImageWithURL:[NSURL URLWithString:((NSArray *)configureModel.images)[0]] placeholderImage:[UIImage imageNamed:@"SX-placeholder"]];
 }
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 15, kScreenWidth - 100, 30)];
        _titleLabel.numberOfLines = 0;
        _titleLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_titleLabel];
        _coverImg = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWidth - 70, 12.5, 55, 55)];
        [self.contentView addSubview:_coverImg];
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
